#include </usr/include/mysql/mysql.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
   MYSQL *conn;
   MYSQL_RES *res;
   MYSQL_ROW row;
   char *server = "localhost";
   char *user = "root";
   char *password = "PASSWORD"; 
   char *database = "mysql";
   conn = mysql_init(NULL);

   /* Connect to database */

   /* send SQL query */
   char statement[512];
   char *my_str = (char*)malloc(12 * sizeof(char));
   scanf("%s",my_str);

   strcpy(statement,"INSERT INTO table VALUES ('");
   strcat(statement, my_str);
   strcat(statement, "')");
   mysql_query(conn, statement);

   /* close connection */
   mysql_free_result(res);
   mysql_close(conn);
   return 0;
}
